FTEST

Syntax: FTEST (name)
Location: Toolkit II

The function FTEST is designed to allow you to test for the status of a file with the specified name. It will return a value of 0 if the given name can be opened for input only.  It may however return a negative number representing an error code which would result if you tried to OPEN or OPEN_IN that file.

NOTE:
The return of -6 (channel not open) has a special meaning in relation to this function, it means that the function could not find any room in the channel table to try and access the file.

FTEST will not warn you if a disk is read only, which can create problems.

CROSS-REFERENCE:
FOPEN and FOP_IN allow you to open files safely.
DMEDIUM_RDONLY can be used to find out if a disk is write protected.
